Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

fix: omit parallel_tool_calls from LiteLLM provider - #10241

Closed
ghost wants to merge 1 commit into
mainfrom
fix/litellm-remove-parallel-tool-calls
Closed

fix: omit parallel_tool_calls from LiteLLM provider#10241
ghost wants to merge 1 commit into
mainfrom
fix/litellm-remove-parallel-tool-calls

Conversation

@ghost

@ghost ghost commented Dec 20, 2025

Copy link
Copy Markdown

Fixes the issue where the parallel_tool_calls parameter was being sent to LiteLLM backends that do not support it (e.g., AWS Bedrock).

Problem

The previous approach (PR #10235) attempted to detect Bedrock models specifically, but this incorrectly marked all Anthropic models as Bedrock models due to the anthropic. prefix check. This caused issues for users using Anthropic models directly through LiteLLM.

Solution

Instead of trying to detect which backends support parallel_tool_calls, we simply omit the parameter entirely from all LiteLLM requests. This is acceptable because:

  • We already handle parallel tool calling restrictions through system prompts
  • Not all LiteLLM backends support this parameter
  • The parameter is OpenAI-specific and may not be relevant for other providers

Changes

  • Removed the parallel_tool_calls parameter from LiteLLM request options
  • Added tests to verify the parameter is omitted for all models
  • Simplified the implementation by removing the isBedrockModel() detection logic

Testing

✅ All existing tests pass
✅ Added 2 new test cases to verify parallel_tool_calls is omitted for all models


View task on Roo Code Cloud

- Remove parallel_tool_calls parameter from all LiteLLM requests
- This parameter is not supported by all LiteLLM backends (e.g., Bedrock)
- Parallel tool calling is already handled via system prompts
- Update tests to verify parallel_tool_calls is omitted for all models
@ghost

ghost commented Dec 20, 2025

Copy link
Copy Markdown
Author

Rooviewer Clock   See task on Roo Cloud

Review completed. No issues found.

  • Code changes are clean and minimal
  • Tests properly verify the behavior
  • All tests pass

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 20, 2025
@ghost

ghost commented Dec 20, 2025

Copy link
Copy Markdown
Author

Closing this PR in favor of updating the original PR #10235 with the correct Bedrock detection logic.

@ghost ghost closed this Dec 20, 2025
@github-project-automation github-project-automation Bot moved this from Triage to Done in Roo Code Roadmap Dec 20, 2025
@github-project-automation github-project-automation Bot moved this from New to Done in Roo Code Roadmap Dec 20, 2025
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants